package com.example.user.dao;

import com.example.user.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @BelongsProject: fourperiodtest
 * @BelongsPackage: com.example.user.dao
 * @Author: 江岸
 * @CreateTime: 2020-06-30 10:31
 * @Description:
 */
@Mapper
public interface UserMapper {
    @Select("select count(*) from user where userName = #{userName}")
    int checkName(User user);

    @Insert("insert into user(username,password) values(#{userName},#{password})")
    int registere(User user);

    @Select("select * from user where userName = #{userName} and password = #{password}")
    int login(User user);

}
